<template>
    <div>
      <h2>Sibling Component A</h2>
      <Field name="siblingFieldA" :component="[Input]" />
      <button @click="updateSiblingData">Update Sibling Data</button>
    </div>
  </template>
  
  <script setup>
  import { Input } from 'ant-design-vue';
  import { Field, useForm } from '@formily/vue';
  
  // 获取表单实例
  const form = useForm();
  
  // 更新兄弟组件数据的方法
  const updateSiblingData = () => {
    form.value.setFieldValue('siblingFieldA', 'Updated value from Sibling A');
  };
  </script>
  
  <style scoped>
  button {
    margin-top: 5px;
  }
  </style>